﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityCreater.Service
{
   public static  class DBService
    {
        public static Tuple<bool,string> ConnectIsSuccess(string connstr)
        {
            try
            {
                 new SQLBuilder.Repositories.SqlRepository(connstr).FindObject(@"select  @@version");
                return new Tuple<bool, string>(true, "");
            }
            catch (Exception ex)
            {
                return new Tuple<bool, string>(false, ex.Message);
            }
        }
    }
}
